package com.nbjtjc.safe.mapper.emg.handle;

import com.nbjtjc.safe.model.emg.handle.EmgHandleListPublic;
import com.nbjtjc.util.MyMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface EmgHandleListPublicMapper extends MyMapper<EmgHandleListPublic> {

    List<EmgHandleListPublic>  search(@Param("listPublic") EmgHandleListPublic emgHandleListPublic);

    @Select(" SELECT emg_handle_list_public.*,sys_user.username AS executeUserName from emg_handle_list_public  " +
            "    LEFT JOIN sys_user ON sys_user.user_id=emg_handle_list_public.execute_user_id " +
            " where emg_handle_list_public.handle_public_id=#{handlePublicId}")
    List<EmgHandleListPublic> findByHandlePublicId(@Param("handlePublicId") int handlePublicId);
}